﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using r4u.business.logic.layer.ALERT;
using r4u.business.logic.layer.REGISTER;

namespace r4u.Controllers
{
    public class ForgetPasswordController : Controller
    {
        //
        // GET: /ForgetPassword/

        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Reset(User user)
        {
            Mail mail = new Mail();

            if (mail.SendPasswordResetLink(user.email))
            {
                return new HttpStatusCodeResult(HttpStatusCode.OK);
            }
            else
            {
                return new HttpStatusCodeResult(HttpStatusCode.InternalServerError);
            }
        }

    }
}
